<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>view事件的监听v-on</title>
  <script src="../js/vue.js"></script>
</head>
<body>
  <div id="app">
    <!-- 前端开发-->
      <p>{{counter}}</p>
      <button v-on:click="counter++">+</button>
      <button v-on:click="counter--">-</button>
      <p>----------------------------------</p>

      <button @click="increase()">+</button>
      <button @click="counter--">-</button>
  </div>
<br>
  <script>
    let app = new Vue({
      el:"#app",
      data:{
           msg:'hello world',
           counter:0
       },
       methods:{
        increase(){
            console.log(event);
            this.counter++
        },
        decrease(){
            this.counter--
        }
       },
     })
   </script>
</body>
</html>